/*
 * AsynchTimer.h
 *
 *  Created on: 19.05.2011
 *      Author: aaw707
 */

#ifndef ASYNCHTIMER_H_
#define ASYNCHTIMER_H_

#include <stdio.h>
#include <sys/neutrino.h>
#include <hw/inout.h>
#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include <errno.h>

#include "CallInterface.h"

class AsynchTimer {
public:
AsynchTimer(CallInterface& callee, unsigned int timeSpan)
	: callee_(callee)
	,timeSpan_(timeSpan) {}
void trigger() {
	sleep(timeSpan_);
	callee_.callback();
}


private:
CallInterface& callee_;
unsigned int timeSpan_;

};

#endif /* ASYNCHTIMER_H_ */
